using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Add Geometry Attributes</para>
    /// <para>Adds new attribute fields to the input features representing the spatial or geometric characteristics and location of each feature, such as length or area and x-, y-, z-, and m-coordinates.</para>
    /// <para>将新属性字段添加到表示每个要素的空间或几何特征和位置的输入要素中，例如长度或面积以及 x、y、z 和 m 坐标。</para>
    /// </summary>    
    [DisplayName("Add Geometry Attributes")]
    public class AddGeometryAttributes : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddGeometryAttributes()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Features">
        /// <para>Input Features</para>
        /// <para>The input features to which new attribute fields will be added to store properties such as length, area, or x-, y-, z-, and m-coordinates.</para>
        /// <para>将添加新属性字段以存储长度、面积或 x、y、z 和 m 坐标等属性的输入要素。</para>
        /// </param>
        /// <param name="_Geometry_Properties">
        /// <para>Geometry Properties</para>
        /// <para><xdoc>
        ///   <para>Specifies the geometry or shape properties that will be calculated into new attribute fields.</para>
        ///   <bulletList>
        ///     <bullet_item>Area—An attribute will be added to store the area of each polygon feature.</bullet_item><para/>
        ///     <bullet_item>Geodesic area—An attribute will be added to store the shape-preserving geodesic area of each polygon feature.</bullet_item><para/>
        ///     <bullet_item>Centroid coordinates—Attributes will be added to store the centroid coordinates of each feature.</bullet_item><para/>
        ///     <bullet_item>Central point coordinates—Attributes will be added to store the coordinates of a central point inside or on each feature.</bullet_item><para/>
        ///     <bullet_item>Extent coordinates—Attributes will be added to store the extent coordinates of each feature.</bullet_item><para/>
        ///     <bullet_item>Length—An attribute will be added to store the length of each line feature.</bullet_item><para/>
        ///     <bullet_item>Geodesic length—An attribute will be added to store the shape-preserving geodesic length of each line feature.</bullet_item><para/>
        ///     <bullet_item>3D length—An attribute will be added to store the 3D length of each line feature.</bullet_item><para/>
        ///     <bullet_item>Line bearing—An attribute will be added to store the start-to-end bearing of each line feature. Values range from 0 to 360, with 0 meaning north, 90 east, 180 south, and 270 west.</bullet_item><para/>
        ///     <bullet_item>Line start, midpoint, and end coordinates—Attributes will be added to store the coordinates of the start, mid, and end points of each feature.</bullet_item><para/>
        ///     <bullet_item>Number of parts—An attribute will be added to store the number of parts composing each feature.</bullet_item><para/>
        ///     <bullet_item>Length of perimeter—An attribute will be added to store the length of the perimeter or border of each polygon feature.</bullet_item><para/>
        ///     <bullet_item>Geodesic length of perimeter—An attribute will be added to store the shape-preserving geodesic length of the perimeter or border of each polygon feature.</bullet_item><para/>
        ///     <bullet_item>Number of vertices—An attribute will be added to store the number of points or vertices composing each feature.</bullet_item><para/>
        ///     <bullet_item>Point x-, y-, z-, and m-coordinates—Attributes will be added to store the x-, y-, z-, and m-coordinates of each point feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将计算到新属性字段中的几何或形状属性。</para>
        ///   <bulletList>
        ///     <bullet_item>面积 - 将添加一个属性来存储每个面要素的面积。</bullet_item><para/>
        ///     <bullet_item>测地线区域—将添加一个属性以存储每个面要素的形状保留测地线区域。</bullet_item><para/>
        ///     <bullet_item>质心坐标—将添加属性以存储每个要素的质心坐标。</bullet_item><para/>
        ///     <bullet_item>中心点坐标—将添加属性以存储每个要素内部或上中心点的坐标。</bullet_item><para/>
        ///     <bullet_item>范围坐标 - 将添加属性以存储每个要素的范围坐标。</bullet_item><para/>
        ///     <bullet_item>长度—将添加一个属性来存储每个线要素的长度。</bullet_item><para/>
        ///     <bullet_item>测地线长度—将添加一个属性以存储每个线要素的形状保持测地线长度。</bullet_item><para/>
        ///     <bullet_item>3D 长度—将添加一个属性来存储每个线要素的 3D 长度。</bullet_item><para/>
        ///     <bullet_item>线方位角 - 将添加一个属性以存储每个线要素的起点到端方位角。值范围从 0 到 360，其中 0 表示北，90 表示东，180 表示南，270 表示西。</bullet_item><para/>
        ///     <bullet_item>线起点、中点和终点坐标—将添加属性以存储每个要素的起点、中点和终点的坐标。</bullet_item><para/>
        ///     <bullet_item>零件数 - 将添加一个属性以存储组成每个要素的零件数。</bullet_item><para/>
        ///     <bullet_item>周长 - 将添加一个属性来存储每个面要素的周长或边界长度。</bullet_item><para/>
        ///     <bullet_item>周长测地线长度 - 将添加一个属性以存储每个面要素的周长或边界的形状保持测地线长度。</bullet_item><para/>
        ///     <bullet_item>折点数—将添加一个属性以存储组成每个要素的点或折点数。</bullet_item><para/>
        ///     <bullet_item>点 x、y、z 和 m 坐标—将添加属性以存储每个点要素的 x、y、z 和 m 坐标。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public AddGeometryAttributes(object _Input_Features, List<object> _Geometry_Properties)
        {
            this._Input_Features = _Input_Features;
            this._Geometry_Properties = _Geometry_Properties;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Add Geometry Attributes";

        public override string CallName => "management.AddGeometryAttributes";

        public override List<string> AcceptEnvironments => ["outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_Input_Features, _Geometry_Properties, _Length_Unit.GetGPValue(), _Area_Unit.GetGPValue(), _Coordinate_System, _Modified_Input_Features];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features to which new attribute fields will be added to store properties such as length, area, or x-, y-, z-, and m-coordinates.</para>
        /// <para>将添加新属性字段以存储长度、面积或 x、y、z 和 m 坐标等属性的输入要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Features { get; set; }


        /// <summary>
        /// <para>Geometry Properties</para>
        /// <para><xdoc>
        ///   <para>Specifies the geometry or shape properties that will be calculated into new attribute fields.</para>
        ///   <bulletList>
        ///     <bullet_item>Area—An attribute will be added to store the area of each polygon feature.</bullet_item><para/>
        ///     <bullet_item>Geodesic area—An attribute will be added to store the shape-preserving geodesic area of each polygon feature.</bullet_item><para/>
        ///     <bullet_item>Centroid coordinates—Attributes will be added to store the centroid coordinates of each feature.</bullet_item><para/>
        ///     <bullet_item>Central point coordinates—Attributes will be added to store the coordinates of a central point inside or on each feature.</bullet_item><para/>
        ///     <bullet_item>Extent coordinates—Attributes will be added to store the extent coordinates of each feature.</bullet_item><para/>
        ///     <bullet_item>Length—An attribute will be added to store the length of each line feature.</bullet_item><para/>
        ///     <bullet_item>Geodesic length—An attribute will be added to store the shape-preserving geodesic length of each line feature.</bullet_item><para/>
        ///     <bullet_item>3D length—An attribute will be added to store the 3D length of each line feature.</bullet_item><para/>
        ///     <bullet_item>Line bearing—An attribute will be added to store the start-to-end bearing of each line feature. Values range from 0 to 360, with 0 meaning north, 90 east, 180 south, and 270 west.</bullet_item><para/>
        ///     <bullet_item>Line start, midpoint, and end coordinates—Attributes will be added to store the coordinates of the start, mid, and end points of each feature.</bullet_item><para/>
        ///     <bullet_item>Number of parts—An attribute will be added to store the number of parts composing each feature.</bullet_item><para/>
        ///     <bullet_item>Length of perimeter—An attribute will be added to store the length of the perimeter or border of each polygon feature.</bullet_item><para/>
        ///     <bullet_item>Geodesic length of perimeter—An attribute will be added to store the shape-preserving geodesic length of the perimeter or border of each polygon feature.</bullet_item><para/>
        ///     <bullet_item>Number of vertices—An attribute will be added to store the number of points or vertices composing each feature.</bullet_item><para/>
        ///     <bullet_item>Point x-, y-, z-, and m-coordinates—Attributes will be added to store the x-, y-, z-, and m-coordinates of each point feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将计算到新属性字段中的几何或形状属性。</para>
        ///   <bulletList>
        ///     <bullet_item>面积 - 将添加一个属性来存储每个面要素的面积。</bullet_item><para/>
        ///     <bullet_item>测地线区域—将添加一个属性以存储每个面要素的形状保留测地线区域。</bullet_item><para/>
        ///     <bullet_item>质心坐标—将添加属性以存储每个要素的质心坐标。</bullet_item><para/>
        ///     <bullet_item>中心点坐标—将添加属性以存储每个要素内部或上中心点的坐标。</bullet_item><para/>
        ///     <bullet_item>范围坐标 - 将添加属性以存储每个要素的范围坐标。</bullet_item><para/>
        ///     <bullet_item>长度—将添加一个属性来存储每个线要素的长度。</bullet_item><para/>
        ///     <bullet_item>测地线长度—将添加一个属性以存储每个线要素的形状保持测地线长度。</bullet_item><para/>
        ///     <bullet_item>3D 长度—将添加一个属性来存储每个线要素的 3D 长度。</bullet_item><para/>
        ///     <bullet_item>线方位角 - 将添加一个属性以存储每个线要素的起点到端方位角。值范围从 0 到 360，其中 0 表示北，90 表示东，180 表示南，270 表示西。</bullet_item><para/>
        ///     <bullet_item>线起点、中点和终点坐标—将添加属性以存储每个要素的起点、中点和终点的坐标。</bullet_item><para/>
        ///     <bullet_item>零件数 - 将添加一个属性以存储组成每个要素的零件数。</bullet_item><para/>
        ///     <bullet_item>周长 - 将添加一个属性来存储每个面要素的周长或边界长度。</bullet_item><para/>
        ///     <bullet_item>周长测地线长度 - 将添加一个属性以存储每个面要素的周长或边界的形状保持测地线长度。</bullet_item><para/>
        ///     <bullet_item>折点数—将添加一个属性以存储组成每个要素的点或折点数。</bullet_item><para/>
        ///     <bullet_item>点 x、y、z 和 m 坐标—将添加属性以存储每个点要素的 x、y、z 和 m 坐标。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geometry Properties")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _Geometry_Properties { get; set; }


        /// <summary>
        /// <para>Length Unit</para>
        /// <para><xdoc>
        ///   <para>Specifies the unit in which the length will be calculated.</para>
        ///   <bulletList>
        ///     <bullet_item>Feet (United States)—Length in feet (United States)</bullet_item><para/>
        ///     <bullet_item>Meters—Length in meters</bullet_item><para/>
        ///     <bullet_item>Kilometers—Length in kilometers</bullet_item><para/>
        ///     <bullet_item>Miles (United States)—Length in miles (United States)</bullet_item><para/>
        ///     <bullet_item>Nautical miles (United States)—Length in nautical miles (United States)</bullet_item><para/>
        ///     <bullet_item>Yards (United States)—Length in yards (United States)</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定计算长度的单位。</para>
        ///   <bulletList>
        ///     <bullet_item>英尺（美国）—长度（以英尺为单位）（美国）</bullet_item><para/>
        ///     <bullet_item>米 - 以米为单位的长度</bullet_item><para/>
        ///     <bullet_item>公里 - 长度（以公里为单位）</bullet_item><para/>
        ///     <bullet_item>英里（美国）—长度（以英里为单位）（美国）</bullet_item><para/>
        ///     <bullet_item>海里（美国）—长度（海里（美国）</bullet_item><para/>
        ///     <bullet_item>码（美国）—长度（以码为单位）（美国）</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Length Unit")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Length_Unit_value? _Length_Unit { get; set; } = null;

        public enum _Length_Unit_value
        {
            /// <summary>
            /// <para>Feet (United States)</para>
            /// <para>Feet (United States)—Length in feet (United States)</para>
            /// <para>英尺（美国）—长度（以英尺为单位）（美国）</para>
            /// </summary>
            [Description("Feet (United States)")]
            [GPEnumValue("FEET_US")]
            _FEET_US,

            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters—Length in meters</para>
            /// <para>米 - 以米为单位的长度</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("METERS")]
            _METERS,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers—Length in kilometers</para>
            /// <para>公里 - 长度（以公里为单位）</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("KILOMETERS")]
            _KILOMETERS,

            /// <summary>
            /// <para>Miles (United States)</para>
            /// <para>Miles (United States)—Length in miles (United States)</para>
            /// <para>英里（美国）—长度（以英里为单位）（美国）</para>
            /// </summary>
            [Description("Miles (United States)")]
            [GPEnumValue("MILES_US")]
            _MILES_US,

            /// <summary>
            /// <para>Nautical miles (United States)</para>
            /// <para>Nautical miles (United States)—Length in nautical miles (United States)</para>
            /// <para>海里（美国）—长度（海里（美国）</para>
            /// </summary>
            [Description("Nautical miles (United States)")]
            [GPEnumValue("NAUTICAL_MILES")]
            _NAUTICAL_MILES,

            /// <summary>
            /// <para>Yards (United States)</para>
            /// <para>Yards (United States)—Length in yards (United States)</para>
            /// <para>码（美国）—长度（以码为单位）（美国）</para>
            /// </summary>
            [Description("Yards (United States)")]
            [GPEnumValue("YARDS")]
            _YARDS,

        }

        /// <summary>
        /// <para>Area Unit</para>
        /// <para><xdoc>
        ///   <para>Specifies the unit in which the area will be calculated.</para>
        ///   <bulletList>
        ///     <bullet_item>Acres—Area in acres</bullet_item><para/>
        ///     <bullet_item>Hectares—Area in hectares</bullet_item><para/>
        ///     <bullet_item>Square miles (United States)—Area in square miles (United States)</bullet_item><para/>
        ///     <bullet_item>Square kilometers—Area in square kilometers</bullet_item><para/>
        ///     <bullet_item>Square meters—Area in square meters</bullet_item><para/>
        ///     <bullet_item>Square feet (United States)—Area in square feet (United States)</bullet_item><para/>
        ///     <bullet_item>Square yards (United States)—Area in square yards (United States)</bullet_item><para/>
        ///     <bullet_item>Square nautical miles (United States)—Area in square nautical miles (United States)</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定计算面积的单位。</para>
        ///   <bulletList>
        ///     <bullet_item>英亩 - 面积（以英亩为单位）</bullet_item><para/>
        ///     <bullet_item>公顷 - 面积（公顷）</bullet_item><para/>
        ///     <bullet_item>平方英里（美国）—面积（平方英里（美国）</bullet_item><para/>
        ///     <bullet_item>平方公里 - 面积（平方公里）</bullet_item><para/>
        ///     <bullet_item>平方米 - 面积（平方米）</bullet_item><para/>
        ///     <bullet_item>平方英尺（美国）—面积（平方英尺）（美国）</bullet_item><para/>
        ///     <bullet_item>平方码（美国）—面积（平方码）（美国）</bullet_item><para/>
        ///     <bullet_item>平方海里（美国）—面积（平方海里（美国）</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Area Unit")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Area_Unit_value? _Area_Unit { get; set; } = null;

        public enum _Area_Unit_value
        {
            /// <summary>
            /// <para>Acres</para>
            /// <para>Acres—Area in acres</para>
            /// <para>英亩 - 面积（以英亩为单位）</para>
            /// </summary>
            [Description("Acres")]
            [GPEnumValue("ACRES")]
            _ACRES,

            /// <summary>
            /// <para>Hectares</para>
            /// <para>Hectares—Area in hectares</para>
            /// <para>公顷 - 面积（公顷）</para>
            /// </summary>
            [Description("Hectares")]
            [GPEnumValue("HECTARES")]
            _HECTARES,

            /// <summary>
            /// <para>Square miles (United States)</para>
            /// <para>Square miles (United States)—Area in square miles (United States)</para>
            /// <para>平方英里（美国）—面积（平方英里（美国）</para>
            /// </summary>
            [Description("Square miles (United States)")]
            [GPEnumValue("SQUARE_MILES_US")]
            _SQUARE_MILES_US,

            /// <summary>
            /// <para>Square kilometers</para>
            /// <para>Square kilometers—Area in square kilometers</para>
            /// <para>平方公里 - 面积（平方公里）</para>
            /// </summary>
            [Description("Square kilometers")]
            [GPEnumValue("SQUARE_KILOMETERS")]
            _SQUARE_KILOMETERS,

            /// <summary>
            /// <para>Square meters</para>
            /// <para>Square meters—Area in square meters</para>
            /// <para>平方米 - 面积（平方米）</para>
            /// </summary>
            [Description("Square meters")]
            [GPEnumValue("SQUARE_METERS")]
            _SQUARE_METERS,

            /// <summary>
            /// <para>Square feet (United States)</para>
            /// <para>Square feet (United States)—Area in square feet (United States)</para>
            /// <para>平方英尺（美国）—面积（平方英尺）（美国）</para>
            /// </summary>
            [Description("Square feet (United States)")]
            [GPEnumValue("SQUARE_FEET_US")]
            _SQUARE_FEET_US,

            /// <summary>
            /// <para>Square yards (United States)</para>
            /// <para>Square yards (United States)—Area in square yards (United States)</para>
            /// <para>平方码（美国）—面积（平方码）（美国）</para>
            /// </summary>
            [Description("Square yards (United States)")]
            [GPEnumValue("SQUARE_YARDS")]
            _SQUARE_YARDS,

            /// <summary>
            /// <para>Square nautical miles (United States)</para>
            /// <para>Square nautical miles (United States)—Area in square nautical miles (United States)</para>
            /// <para>平方海里（美国）—面积（平方海里（美国）</para>
            /// </summary>
            [Description("Square nautical miles (United States)")]
            [GPEnumValue("SQUARE_NAUTICAL_MILES")]
            _SQUARE_NAUTICAL_MILES,

        }

        /// <summary>
        /// <para>Coordinate System</para>
        /// <para>The coordinate system in which the coordinates, length, and area will be calculated. The coordinate system of the input features is used by default.</para>
        /// <para>计算坐标、长度和面积的坐标系。默认情况下，使用输入要素的坐标系。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Coordinate System")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Coordinate_System { get; set; } = null;


        /// <summary>
        /// <para>Modified Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Modified Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Modified_Input_Features { get; set; }


        public AddGeometryAttributes SetEnv(object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}